#!/bin/bash

echo
echo "#######################          miscSearch starting           ########################"
echo

HOME=$(cd "$(dirname $0)"; pwd)
echo "miscSearch.home = $HOME"
cd $HOME

conf=etc

ETC=$(cd "$conf"; pwd)
echo "config.dir = $ETC"

LIB=lib
LOG_FILE=miscSearch.log

CLASSPATH=$HOME:$ETC
for f in $LIB/*.jar; do
  CLASSPATH=${CLASSPATH}:$f;
done

#echo "CLASSPATH = $CLASSPATH"

nohup java -server -Xloggc:gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+UseConcMarkSweepGC -Xmx2g -Xms2g -Xmn1g -classpath $CLASSPATH com.easou.ps.main.MiscServer 7500 > $LOG_FILE &

ip=`/sbin/ifconfig eth0 | grep "inet addr" | cut -d':' -f2 | cut -d' ' -f1`

echo
echo "#######################          miscSearch started           ########################"
echo

